package com.guangjian.asc.retail.domain;

import java.math.BigDecimal;

import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

import com.guangjian.asc.product.domain.Product;

@RooJavaBean
@RooToString
@RooEntity(finders={"findOrderDetailsBySalesOrder"})
public class OrderDetail {

	@NotNull
	@ManyToOne(fetch = FetchType.LAZY)
	private SalesOrder salesOrder;

	@NotNull
	@ManyToOne(fetch = FetchType.LAZY)
	private Product product;

	private BigDecimal actualPrice;

	private int amount;
}
